package cn.walls1717.wallsmall.search.feign;

import cn.walls1717.wallsmall.search.vo.AttrRespVO;
import cn.walls1717.wallsmall.search.vo.BrandEntity;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author walls1717
 * @since 2022/11/07 22:01
 **/
@FeignClient("wallsmall-product")
public interface ProductFeignService {

    /**
     * 根据属性id查询属性信息
     *
     * @param attrId 属性id
     * @return 属性信息
     */
    @GetMapping("/product/attr/info/inner/{attrId}")
    AttrRespVO attrInfo(@PathVariable("attrId") Long attrId);

    /**
     * 根据品牌id集合查询品牌
     *
     * @param brandIds 品牌id集合
     * @return 品牌集合
     */
    @GetMapping("/product/brand/inner/infos")
    List<BrandEntity> listBrandsByBrandIds(@RequestParam("brandIds") List<Long> brandIds);
}
